com.github.droidfu.http
Class CachedHttpResponse

java.lang.Object
  extended by com.github.droidfu.http.CachedHttpResponse
All Implemented Interfaces:
BetterHttpResponse

public class CachedHttpResponse
extends Object
implements BetterHttpResponse

A response proxy returning data from a HttpResponseCache

Author:
Matthias Kaeppler

Nested Class Summary
static class CachedHttpResponse.ResponseData
           
 
Constructor Summary
CachedHttpResponse(String url)
           
 
Method Summary
 String getHeader(String header)
           
 InputStream getResponseBody()
           
 byte[] getResponseBodyAsBytes()
           
 String getResponseBodyAsString()
           
 int getStatusCode()
           
 org.apache.http.HttpResponse unwrap()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedHttpResponse

public CachedHttpResponse(String url)
Method Detail

getHeader

public String getHeader(String header)
Specified by:
getHeader in interface BetterHttpResponse

getResponseBody

public InputStream getResponseBody()
                            throws IOException
Specified by:
getResponseBody in interface BetterHttpResponse
Throws:
IOException

getResponseBodyAsBytes

public byte[] getResponseBodyAsBytes()
                              throws IOException
Specified by:
getResponseBodyAsBytes in interface BetterHttpResponse
Throws:
IOException

getResponseBodyAsString

public String getResponseBodyAsString()
                               throws IOException
Specified by:
getResponseBodyAsString in interface BetterHttpResponse
Throws:
IOException

getStatusCode

public int getStatusCode()
Specified by:
getStatusCode in interface BetterHttpResponse

unwrap

public org.apache.http.HttpResponse unwrap()
Specified by:
unwrap in interface BetterHttpResponse


Copyright © 2011. All Rights Reserved.